<main id="content-container" class="container" role="main">
<div class="row" style="margin-top:20px;">
  <div class="col-md-10 col-md-offset-1">
    <h4 class="lead">Fightere Registered Users</h4>
    <div class="well">
      <table class="table table-condensed table-striped">
	      <thead>
          <tr>
            <th>ID</th>
            <th>Facebook UID</th>
            <th>Email</th>
            <th>Registered</th>
            <th>Status</th>
            <th>Fighters</th>
          </tr>
        </thead>   
        <tbody>
        <% @users.each do |user| %>
          <tr>
            <td><%= user.id %></td>
            <td><%= user.uid %></td>
            <td><%= user.email %></td>
            <td><%= user.created_at.to_date %></td>
            <td></td>
            <td><%= user.fighters.count %></td>
            <td><%= link_to("Delete user", user_path(user), :data => { :confirm => "User account will be deleted. Are you sure?" }, :method => :delete, :class => 'btn btn-sm btn-danger') unless user == current_user and user.is_admin? %></td>                                       
          </tr>
        <% end %>
        </tbody>
      </table>
    </div>
  </div>
</div>
</main>
